home *** CD-ROM | disk | FTP | other *** search
- #!/bin/bash
-
- ZENITY=`which zenity`
- TARGETHOSTPORT=`$ZENITY --title "Host and Port to connect to" --entry --text "Enter the name of the host and Port (host:port) you want to log in to."`
- TARGETHOST=${TARGETHOSTPORT%:*}
- TARGETPORT=${TARGETHOSTPORT#*:}
-
- if [[ ! $TARGETHOSTPORT =~ ":" ]]; then
- TARGETPORT="22"
- fi
-
- # @@@ should probably get a user name too;
- # for now can bet set using the $USERNAME@ convention
- # @@@ should it do an ssh-add so the user doesn't have to enter its passphrase again?
- ssh -A -X -T -n "$TARGETHOST" -p "$TARGETPORT" /etc/X11/Xsession
-